package com.hluck.navigationviewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class MyViewModel:ViewModel() {

    private val _number = MutableLiveData<Int>(0)
    val number:LiveData<Int>
        get() = _number


    fun changeNumber(number:Int){
        _number.value = number
    }

    fun addNumber(num:Int){
        _number.value = _number.value?.plus(num)
    }

}